package com.fdq.demo.service.impl;

import com.fdq.demo.config.SpringMailComponent;
import com.fdq.demo.service.EmailService;
import com.fdq.demo.tool.TimeTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;

/**
 * @author: 83778
 * @date: 2023-11-15 17:17
 * @desc:
 */
@Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private SpringMailComponent mailSender;
    @Override
    public void send(String content) {
        String time = TimeTool.dateToString(new Date());
        content = "于"+time + "=》excel数据导出"+content;
        mailSender.send("","",content);
        mailSender.send("837783587@qq.com","",content);
    }
}
